//
//  ScheduleTableViewCell.m
//  haolaDoc
//
//  Created by WayneHao on 2017/5/19.
//  Copyright © 2017年 deyi. All rights reserved.
//

#import "ScheduleTableViewCell.h"

@implementation ScheduleTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setScheduleTableViewCell:(ScheduleModel *)scheduleModel{
    if([scheduleModel.mark isEqual:@"0"]){
        NSTimeInterval time=[scheduleModel.startTime doubleValue]/1000;
        NSDate *detaildate=[NSDate dateWithTimeIntervalSince1970:time];
        NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
        [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
        NSString *startTime=[formatter stringFromDate:detaildate];
        self.startTimeLabel.text=startTime;
        self.titleLabel.text=scheduleModel.title;
        self.placeLabel.text=scheduleModel.place;
        self.explainLabel.text=scheduleModel.explain;
    }
}
@end
